﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DotNetNuke.Services.Tokens;

namespace IB.Common
{
    public class CategoryTokenReplace : TokenReplace
    {
        public CategoryTokenReplace() : base(Scope.DefaultSettings)
        {
            UseObjectLessExpression = true;
            PropertySource[ObjectLessToken] = new CategoryInfo();
        }

        public CategoryTokenReplace(CategoryInfo catinfo) :base(Scope.DefaultSettings)
        {
            UseObjectLessExpression = true;
            PropertySource[ObjectLessToken] = catinfo;
            PropertySource["cat"] = catinfo;
        }
        
        public string ReplaceCategoryInfo(string strSource)
        {
            return base.ReplaceTokens(strSource);
        }
    }
}
